import { defineStore } from "pinia";

export const useTestStore = defineStore("test", {
  state: () => {
    return { name: "test", queue: [{ some: "a" }] };
  },
  getters: {
    getQueue(): any[] {
      return this.queue;
    },
    getName(): String {
      return this.name;
    },
  },
  actions: {
    updateName(name: string) {
      this.name = name;
    },
    addQueue(item: any) {
      this.queue.push(item);
    },
    update(queue: any) {
      this.queue = queue;
    },
  },
});
